package com.java2007.hotel.dao.front;

import com.java2007.hotel.pojo.User;

import java.sql.SQLException;

/**
 * 用户dao
 * @author csl
 * @version V1.0
 * @date 2021/01/25
 **/
public interface UserDao {
    /**
     *增加一个客户
     * @param user
     * @return
     */
    int add(User user) throws SQLException;

    /**
     * 根据名字查询客户
     * @param name
     * @return
     */
    User selectByName(String name) throws SQLException;

    /**
     * 根据id查询客户
     * @param id
     * @return
     */
    User selectById(int id) throws SQLException;

    /**
     * 根据id修改客户价钱
     * @param id
     * @return
     */
    int updateAccountById(int id,Long account) throws SQLException;
}
